package com.itheima.day05.myobjects;

import java.util.Objects;

public class Test {
    public static void main(String[] args) {
//        public static String toString(对象)	返回参数中对象的字符串表示形式。
        /*Student stu = new Student("张三",21);
        String toString = Objects.toString(stu);
        System.out.println(toString);*/

//        public static String toString(对象, 默认字符串)	返回对象的字符串表示形式。如果传入对象为null，返回第二个变量参数
        /*Student stu = new Student("张三",21);
        stu = null;
        String toString = Objects.toString(stu,"张帆是大帅逼");
        System.out.println(toString);*/

//        public static Boolean isNull(对象)	判断对象是否为空
        /*Student stu = new Student();
        stu = null;
        boolean aNull = Objects.isNull(stu);
        System.out.println(aNull);*/
//        public static Boolean nonNull(对象)	判断对象是否不为空
        Student stu = new Student();
        // stu = null;
        boolean aNull = Objects.isNull(stu);
        System.out.println(aNull);
    }
}
